using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Data_LogData_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Data.LogData);

            field = type.GetField("condition", flag);
            app.RegisterCLRFieldGetter(field, get_condition_0);
            app.RegisterCLRFieldSetter(field, set_condition_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_condition_0, AssignFromStack_condition_0);
            field = type.GetField("stackTrace", flag);
            app.RegisterCLRFieldGetter(field, get_stackTrace_1);
            app.RegisterCLRFieldSetter(field, set_stackTrace_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_stackTrace_1, AssignFromStack_stackTrace_1);
            field = type.GetField("type", flag);
            app.RegisterCLRFieldGetter(field, get_type_2);
            app.RegisterCLRFieldSetter(field, set_type_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_type_2, AssignFromStack_type_2);
            field = type.GetField("addr", flag);
            app.RegisterCLRFieldGetter(field, get_addr_3);
            app.RegisterCLRFieldSetter(field, set_addr_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_addr_3, AssignFromStack_addr_3);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Data.LogData());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Data.LogData[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_condition_0(ref object o)
        {
            return ((huqiang.Data.LogData)o).condition;
        }

        static StackObject* CopyToStack_condition_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.LogData)o).condition;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_condition_0(ref object o, object v)
        {
            ((huqiang.Data.LogData)o).condition = (System.String)v;
        }

        static StackObject* AssignFromStack_condition_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @condition = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.LogData)o).condition = @condition;
            return ptr_of_this_method;
        }

        static object get_stackTrace_1(ref object o)
        {
            return ((huqiang.Data.LogData)o).stackTrace;
        }

        static StackObject* CopyToStack_stackTrace_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.LogData)o).stackTrace;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_stackTrace_1(ref object o, object v)
        {
            ((huqiang.Data.LogData)o).stackTrace = (System.String)v;
        }

        static StackObject* AssignFromStack_stackTrace_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @stackTrace = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.LogData)o).stackTrace = @stackTrace;
            return ptr_of_this_method;
        }

        static object get_type_2(ref object o)
        {
            return ((huqiang.Data.LogData)o).type;
        }

        static StackObject* CopyToStack_type_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.LogData)o).type;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_type_2(ref object o, object v)
        {
            ((huqiang.Data.LogData)o).type = (UnityEngine.LogType)v;
        }

        static StackObject* AssignFromStack_type_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.LogType @type = (UnityEngine.LogType)typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20);
            ((huqiang.Data.LogData)o).type = @type;
            return ptr_of_this_method;
        }

        static object get_addr_3(ref object o)
        {
            return ((huqiang.Data.LogData)o).addr;
        }

        static StackObject* CopyToStack_addr_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Data.LogData)o).addr;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_addr_3(ref object o, object v)
        {
            ((huqiang.Data.LogData)o).addr = (System.String)v;
        }

        static StackObject* AssignFromStack_addr_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @addr = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Data.LogData)o).addr = @addr;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Data.LogData();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
